#pragma once
#include <string>

class CmdLine
{
    CmdLine(const CmdLine&);
    CmdLine& operator=(const CmdLine&);
    
public:

    CmdLine();
    
    int Parse(int argc, wchar_t* argv[]);
    
    const wchar_t* GetInputFileName() const;
    const wchar_t* GetOutputFileName() const;
    const CLSID& GetReader() const;
    const CLSID& GetSplitter() const;
    bool ScriptMode() const;
    
private:
    
    const wchar_t* const* m_argv;  //unpermutated 
    bool m_usage;
    bool m_list;
    bool m_version;
    const wchar_t* m_input;
    const wchar_t* m_output;
    CLSID m_reader;
    CLSID m_splitter;
    bool m_script;
    bool m_verbose;
    
    int Parse(wchar_t**);
    int ParseWindows(wchar_t**);
    int ParseShort(wchar_t**);
    int ParseLong(wchar_t**);
    void PrintUsage() const;
    void PrintVersion() const;
    void ListArgs() const;
    void VetInputFileName() const;
    static std::wstring GetPath(const wchar_t*);
    static std::wstring ToString(const GUID&);
    
};
